<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // var now = new Date();
        // alert(`${now.getMonth()+1}月${now.getDate()}日  星期${now.getDay()}`)
        // alert(`${now.toLocaleDateString()} 类型为${typeof(toLocaleDateString)}`)
        // var res = confirm('hehe');
        // alert(res);
        // var aaa=prompt('请说出你最期待的剧')
        // alert(aaa)
        function magic(){
            console.log('下课啦');
        }
        // var id = setTimeout(magic,1500)
        // clearTimeout(id)
        var id = setInterval(magic, 1000)
        clearInterval(id)
    </script>
</body>
</html>